<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>The DOMElement class</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="class.domdocumenttype.html">« DOMDocumentType</a></li>
      <li style="float: right;"><a href="domelement.construct.html">DOMElement::__construct »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="book.dom.html">DOM</a></li>
    <li>The DOMElement class</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="class.domelement" class="reference">
 <h1 class="title">The DOMElement class</h1>
 
 
 <div class="partintro"><p class="verinfo">(PHP 5, PHP 7, PHP 8)</p>
 



 
  <div class="section" id="domelement.synopsis">
   <h2 class="title">类摘要</h2>
 

   <div class="classsynopsis">
    <div class="ooclass">
     
    </div>

    <div class="classsynopsisinfo">
     <span class="ooclass">
      <span class="modifier">class</span> <strong class="classname">DOMElement</strong>
     </span>

     <span class="ooclass">
      <span class="modifier">extends</span>
       <a href="class.domnode.html" class="classname">DOMNode</a>
     </span>

     <span class="oointerface"><span class="modifier">implements</span> 
       <a href="class.domparentnode.html" class="interfacename">DOMParentNode</a></span><span class="oointerface">,  <a href="class.domchildnode.html" class="interfacename">DOMChildNode</a></span> {</div>

    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 属性 */</div>
    <div class="fieldsynopsis">
     <span class="modifier">public</span>
     <span class="modifier">readonly</span>
     <span class="type">string</span>
      <var class="varname"><a href="class.domelement.html#domelement.props.tagname">$<var class="varname">tagName</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">readonly</span>
     <span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span>
      <var class="varname"><a href="class.domelement.html#domelement.props.schematypeinfo">$<var class="varname">schemaTypeInfo</var></a></var><span class="initializer"> = null</span>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">readonly</span>
     <span class="type">?</span><span class="type"><span class="type"><a href="class.domelement.html" class="type DOMElement">DOMElement</a></span><span class="type"></span></span>
      <var class="varname"><a href="class.domelement.html#domelement.props.firstelementchild">$<var class="varname">firstElementChild</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">readonly</span>
     <span class="type">?</span><span class="type"><span class="type"><a href="class.domelement.html" class="type DOMElement">DOMElement</a></span><span class="type"></span></span>
      <var class="varname"><a href="class.domelement.html#domelement.props.lastelementchild">$<var class="varname">lastElementChild</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">readonly</span>
     <span class="type">int</span>
      <var class="varname"><a href="class.domelement.html#domelement.props.childelementcount">$<var class="varname">childElementCount</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">readonly</span>
     <span class="type">?</span><span class="type"><span class="type"><a href="class.domelement.html" class="type DOMElement">DOMElement</a></span><span class="type"></span></span>
      <var class="varname"><a href="class.domelement.html#domelement.props.previouselementsibling">$<var class="varname">previousElementSibling</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">readonly</span>
     <span class="type">?</span><span class="type"><span class="type"><a href="class.domelement.html" class="type DOMElement">DOMElement</a></span><span class="type"></span></span>
      <var class="varname"><a href="class.domelement.html#domelement.props.nextelementsibling">$<var class="varname">nextElementSibling</var></a></var>;</div>


    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 继承的属性 */</div>
    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">readonly</span>
     <span class="type">string</span>
      <var class="varname"><a href="class.domnode.html#domnode.props.nodename">$<var class="varname">nodeName</var></a></var>;</div>
<div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="type">?</span><span class="type"><span class="type">string</span><span class="type"></span></span>
      <var class="varname"><a href="class.domnode.html#domnode.props.nodevalue">$<var class="varname">nodeValue</var></a></var>;</div>
<div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">readonly</span>
     <span class="type">int</span>
      <var class="varname"><a href="class.domnode.html#domnode.props.nodetype">$<var class="varname">nodeType</var></a></var>;</div>
<div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">readonly</span>
     <span class="type">?</span><span class="type"><span class="type"><a href="class.domnode.html" class="type DOMNode">DOMNode</a></span><span class="type"></span></span>
      <var class="varname"><a href="class.domnode.html#domnode.props.parentnode">$<var class="varname">parentNode</var></a></var>;</div>
<div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">readonly</span>
     <span class="type"><a href="class.domnodelist.html" class="type DOMNodeList">DOMNodeList</a></span>
      <var class="varname"><a href="class.domnode.html#domnode.props.childnodes">$<var class="varname">childNodes</var></a></var>;</div>
<div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">readonly</span>
     <span class="type">?</span><span class="type"><span class="type"><a href="class.domnode.html" class="type DOMNode">DOMNode</a></span><span class="type"></span></span>
      <var class="varname"><a href="class.domnode.html#domnode.props.firstchild">$<var class="varname">firstChild</var></a></var>;</div>
<div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">readonly</span>
     <span class="type">?</span><span class="type"><span class="type"><a href="class.domnode.html" class="type DOMNode">DOMNode</a></span><span class="type"></span></span>
      <var class="varname"><a href="class.domnode.html#domnode.props.lastchild">$<var class="varname">lastChild</var></a></var>;</div>
<div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">readonly</span>
     <span class="type">?</span><span class="type"><span class="type"><a href="class.domnode.html" class="type DOMNode">DOMNode</a></span><span class="type"></span></span>
      <var class="varname"><a href="class.domnode.html#domnode.props.previoussibling">$<var class="varname">previousSibling</var></a></var>;</div>
<div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">readonly</span>
     <span class="type">?</span><span class="type"><span class="type"><a href="class.domnode.html" class="type DOMNode">DOMNode</a></span><span class="type"></span></span>
      <var class="varname"><a href="class.domnode.html#domnode.props.nextsibling">$<var class="varname">nextSibling</var></a></var>;</div>
<div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">readonly</span>
     <span class="type">?</span><span class="type"><span class="type"><a href="class.domnamednodemap.html" class="type DOMNamedNodeMap">DOMNamedNodeMap</a></span><span class="type"></span></span>
      <var class="varname"><a href="class.domnode.html#domnode.props.attributes">$<var class="varname">attributes</var></a></var>;</div>
<div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">readonly</span>
     <span class="type">?</span><span class="type"><span class="type"><a href="class.domdocument.html" class="type DOMDocument">DOMDocument</a></span><span class="type"></span></span>
      <var class="varname"><a href="class.domnode.html#domnode.props.ownerdocument">$<var class="varname">ownerDocument</var></a></var>;</div>
<div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">readonly</span>
     <span class="type">?</span><span class="type"><span class="type">string</span><span class="type"></span></span>
      <var class="varname"><a href="class.domnode.html#domnode.props.namespaceuri">$<var class="varname">namespaceURI</var></a></var>;</div>
<div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="type">string</span>
      <var class="varname"><a href="class.domnode.html#domnode.props.prefix">$<var class="varname">prefix</var></a></var>;</div>
<div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">readonly</span>
     <span class="type">?</span><span class="type"><span class="type">string</span><span class="type"></span></span>
      <var class="varname"><a href="class.domnode.html#domnode.props.localname">$<var class="varname">localName</var></a></var>;</div>
<div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">readonly</span>
     <span class="type">?</span><span class="type"><span class="type">string</span><span class="type"></span></span>
      <var class="varname"><a href="class.domnode.html#domnode.props.baseuri">$<var class="varname">baseURI</var></a></var>;</div>
<div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="type">string</span>
      <var class="varname"><a href="class.domnode.html#domnode.props.textcontent">$<var class="varname">textContent</var></a></var>;</div>


    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="constructorsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="domelement.construct.html" class="methodname">__construct</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$qualifiedName</code></span>, <span class="methodparam"><span class="type">?</span><span class="type"><span class="type">string</span><span class="type"></span></span> <code class="parameter">$value</code><span class="initializer"> = <strong><code>null</code></strong></span></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$namespace</code><span class="initializer"> = &quot;&quot;</span></span>)</div>

    <div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="domelement.getattribute.html" class="methodname">getAttribute</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$qualifiedName</code></span>): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="domelement.getattributenode.html" class="methodname">getAttributeNode</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$qualifiedName</code></span>): <span class="type"><span class="type"><a href="class.domattr.html" class="type DOMAttr">DOMAttr</a></span>|<span class="type"><span class="type DOMNameSpaceNode">DOMNameSpaceNode</span></span>|<span class="type"><span class="type false">false</span></span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="domelement.getattributenodens.html" class="methodname">getAttributeNodeNS</a></span>(<span class="methodparam"><span class="type">?</span><span class="type"><span class="type">string</span><span class="type"></span></span> <code class="parameter">$namespace</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$localName</code></span>): <span class="type"><span class="type"><a href="class.domattr.html" class="type DOMAttr">DOMAttr</a></span>|<span class="type"><span class="type DOMNameSpaceNode">DOMNameSpaceNode</span></span>|<span class="type">null</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="domelement.getattributens.html" class="methodname">getAttributeNS</a></span>(<span class="methodparam"><span class="type">?</span><span class="type"><span class="type">string</span><span class="type"></span></span> <code class="parameter">$namespace</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$localName</code></span>): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="domelement.getelementsbytagname.html" class="methodname">getElementsByTagName</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$qualifiedName</code></span>): <span class="type"><a href="class.domnodelist.html" class="type DOMNodeList">DOMNodeList</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="domelement.getelementsbytagnamens.html" class="methodname">getElementsByTagNameNS</a></span>(<span class="methodparam"><span class="type">?</span><span class="type"><span class="type">string</span><span class="type"></span></span> <code class="parameter">$namespace</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$localName</code></span>): <span class="type"><a href="class.domnodelist.html" class="type DOMNodeList">DOMNodeList</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="domelement.hasattribute.html" class="methodname">hasAttribute</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$qualifiedName</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="domelement.hasattributens.html" class="methodname">hasAttributeNS</a></span>(<span class="methodparam"><span class="type">?</span><span class="type"><span class="type">string</span><span class="type"></span></span> <code class="parameter">$namespace</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$localName</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="domelement.removeattribute.html" class="methodname">removeAttribute</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$qualifiedName</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="domelement.removeattributenode.html" class="methodname">removeAttributeNode</a></span>(<span class="methodparam"><span class="type"><a href="class.domattr.html" class="type DOMAttr">DOMAttr</a></span> <code class="parameter">$attr</code></span>): <span class="type"><span class="type"><a href="class.domattr.html" class="type DOMAttr">DOMAttr</a></span>|<span class="type"><span class="type false">false</span></span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="domelement.removeattributens.html" class="methodname">removeAttributeNS</a></span>(<span class="methodparam"><span class="type">?</span><span class="type"><span class="type">string</span><span class="type"></span></span> <code class="parameter">$namespace</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$localName</code></span>): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="domelement.setattribute.html" class="methodname">setAttribute</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$qualifiedName</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$value</code></span>): <span class="type"><span class="type"><a href="class.domattr.html" class="type DOMAttr">DOMAttr</a></span>|<span class="type">bool</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="domelement.setattributenode.html" class="methodname">setAttributeNode</a></span>(<span class="methodparam"><span class="type"><a href="class.domattr.html" class="type DOMAttr">DOMAttr</a></span> <code class="parameter">$attr</code></span>): <span class="type"><span class="type"><a href="class.domattr.html" class="type DOMAttr">DOMAttr</a></span>|<span class="type">null</span>|<span class="type"><span class="type false">false</span></span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="domelement.setattributenodens.html" class="methodname">setAttributeNodeNS</a></span>(<span class="methodparam"><span class="type"><a href="class.domattr.html" class="type DOMAttr">DOMAttr</a></span> <code class="parameter">$attr</code></span>): <span class="type"><span class="type"><a href="class.domattr.html" class="type DOMAttr">DOMAttr</a></span>|<span class="type">null</span>|<span class="type"><span class="type false">false</span></span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="domelement.setattributens.html" class="methodname">setAttributeNS</a></span>(<span class="methodparam"><span class="type">?</span><span class="type"><span class="type">string</span><span class="type"></span></span> <code class="parameter">$namespace</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$qualifiedName</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$value</code></span>): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="domelement.setidattribute.html" class="methodname">setIdAttribute</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$qualifiedName</code></span>, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$isId</code></span>): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="domelement.setidattributenode.html" class="methodname">setIdAttributeNode</a></span>(<span class="methodparam"><span class="type"><a href="class.domattr.html" class="type DOMAttr">DOMAttr</a></span> <code class="parameter">$attr</code></span>, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$isId</code></span>): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="domelement.setidattributens.html" class="methodname">setIdAttributeNS</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$namespace</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$qualifiedName</code></span>, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$isId</code></span>): <span class="type"><span class="type void">void</span></span></div>


    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 继承的方法 */</div>
    <div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="domnode.appendchild.html" class="methodname">DOMNode::appendChild</a></span>(<span class="methodparam"><span class="type"><a href="class.domnode.html" class="type DOMNode">DOMNode</a></span> <code class="parameter">$node</code></span>): <span class="type"><span class="type"><a href="class.domnode.html" class="type DOMNode">DOMNode</a></span>|<span class="type"><span class="type false">false</span></span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="domnode.c14n.html" class="methodname">DOMNode::C14N</a></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">bool</span> <code class="parameter">$exclusive</code><span class="initializer"> = <strong><code>false</code></strong></span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">bool</span> <code class="parameter">$withComments</code><span class="initializer"> = <strong><code>false</code></strong></span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">?</span><span class="type"><span class="type">array</span><span class="type"></span></span> <code class="parameter">$xpath</code><span class="initializer"> = <strong><code>null</code></strong></span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">?</span><span class="type"><span class="type">array</span><span class="type"></span></span> <code class="parameter">$nsPrefixes</code><span class="initializer"> = <strong><code>null</code></strong></span></span><br>): <span class="type"><span class="type">string</span>|<span class="type"><span class="type false">false</span></span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="domnode.c14nfile.html" class="methodname">DOMNode::C14NFile</a></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$uri</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">bool</span> <code class="parameter">$exclusive</code><span class="initializer"> = <strong><code>false</code></strong></span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">bool</span> <code class="parameter">$withComments</code><span class="initializer"> = <strong><code>false</code></strong></span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">?</span><span class="type"><span class="type">array</span><span class="type"></span></span> <code class="parameter">$xpath</code><span class="initializer"> = <strong><code>null</code></strong></span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">?</span><span class="type"><span class="type">array</span><span class="type"></span></span> <code class="parameter">$nsPrefixes</code><span class="initializer"> = <strong><code>null</code></strong></span></span><br>): <span class="type"><span class="type">int</span>|<span class="type"><span class="type false">false</span></span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="domnode.clonenode.html" class="methodname">DOMNode::cloneNode</a></span>(<span class="methodparam"><span class="type">bool</span> <code class="parameter">$deep</code><span class="initializer"> = <strong><code>false</code></strong></span></span>): <span class="type"><span class="type"><a href="class.domnode.html" class="type DOMNode">DOMNode</a></span>|<span class="type"><span class="type false">false</span></span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="domnode.getlineno.html" class="methodname">DOMNode::getLineNo</a></span>(): <span class="type">int</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="domnode.getnodepath.html" class="methodname">DOMNode::getNodePath</a></span>(): <span class="type"><span class="type">?</span><span class="type">string</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="domnode.hasattributes.html" class="methodname">DOMNode::hasAttributes</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="domnode.haschildnodes.html" class="methodname">DOMNode::hasChildNodes</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="domnode.insertbefore.html" class="methodname">DOMNode::insertBefore</a></span>(<span class="methodparam"><span class="type"><a href="class.domnode.html" class="type DOMNode">DOMNode</a></span> <code class="parameter">$node</code></span>, <span class="methodparam"><span class="type">?</span><span class="type"><span class="type"><a href="class.domnode.html" class="type DOMNode">DOMNode</a></span><span class="type"></span></span> <code class="parameter">$child</code><span class="initializer"> = <strong><code>null</code></strong></span></span>): <span class="type"><span class="type"><a href="class.domnode.html" class="type DOMNode">DOMNode</a></span>|<span class="type"><span class="type false">false</span></span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="domnode.isdefaultnamespace.html" class="methodname">DOMNode::isDefaultNamespace</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$namespace</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="domnode.issamenode.html" class="methodname">DOMNode::isSameNode</a></span>(<span class="methodparam"><span class="type"><a href="class.domnode.html" class="type DOMNode">DOMNode</a></span> <code class="parameter">$otherNode</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="domnode.issupported.html" class="methodname">DOMNode::isSupported</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$feature</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$version</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="domnode.lookupnamespaceuri.html" class="methodname">DOMNode::lookupNamespaceUri</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$prefix</code></span>): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="domnode.lookupprefix.html" class="methodname">DOMNode::lookupPrefix</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$namespace</code></span>): <span class="type"><span class="type">?</span><span class="type">string</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="domnode.normalize.html" class="methodname">DOMNode::normalize</a></span>(): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="domnode.removechild.html" class="methodname">DOMNode::removeChild</a></span>(<span class="methodparam"><span class="type"><a href="class.domnode.html" class="type DOMNode">DOMNode</a></span> <code class="parameter">$child</code></span>): <span class="type"><span class="type"><a href="class.domnode.html" class="type DOMNode">DOMNode</a></span>|<span class="type"><span class="type false">false</span></span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="domnode.replacechild.html" class="methodname">DOMNode::replaceChild</a></span>(<span class="methodparam"><span class="type"><a href="class.domnode.html" class="type DOMNode">DOMNode</a></span> <code class="parameter">$node</code></span>, <span class="methodparam"><span class="type"><a href="class.domnode.html" class="type DOMNode">DOMNode</a></span> <code class="parameter">$child</code></span>): <span class="type"><span class="type"><a href="class.domnode.html" class="type DOMNode">DOMNode</a></span>|<span class="type"><span class="type false">false</span></span></span></div>

   }</div>

 
  </div>
 

  <div class="section" id="domelement.props">
   <h2 class="title">属性</h2>
   <dl>
    
     <dt id="domelement.props.childelementcount"><var class="varname">childElementCount</var></dt>

     <dd>

      <p class="para">The number of child elements.</p>
     </dd>

    
    
     <dt id="domelement.props.firstelementchild"><var class="varname">firstElementChild</var></dt>

     <dd>

      <p class="para">First child element or <strong><code>null</code></strong>.</p>
     </dd>

    
    
     <dt id="domelement.props.lastelementchild"><var class="varname">lastElementChild</var></dt>

     <dd>

      <p class="para">Last child element or <strong><code>null</code></strong>.</p>
     </dd>

    
    
     <dt id="domelement.props.nextelementsibling"><var class="varname">nextElementSibling</var></dt>

     <dd>

      <p class="para">The next sibling element or <strong><code>null</code></strong>.</p>
     </dd>

    
    
     <dt id="domelement.props.previouselementsibling"><var class="varname">previousElementSibling</var></dt>

     <dd>

      <p class="para">The previous sibling element or <strong><code>null</code></strong>.</p>
     </dd>

    
    
     <dt id="domelement.props.schematypeinfo"><var class="varname">schemaTypeInfo</var></dt>

     <dd>

      <p class="para">Not implemented yet, always return <strong><code>null</code></strong></p>
     </dd>

    
    
     <dt id="domelement.props.tagname"><var class="varname">tagName</var></dt>

     <dd>

      <p class="para">The element name</p>
     </dd>

    
   </dl>

  </div>


  <div class="section">
   <h2 class="title">更新日志</h2>
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>版本</th>
       <th>说明</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>8.0.0</td>
       <td>
        The <var class="varname">firstElementChild</var>, <var class="varname">lastElementChild</var>,
        <var class="varname">childElementCount</var>, <var class="varname">previousElementSibling</var>,
        and <var class="varname">nextElementSibling</var> properties have been added.
       </td>
      </tr>

      <tr>
       <td>8.0.0</td>
       <td>
        <span class="classname"><strong class="classname">DOMElement</strong></span> implements
        <span class="interfacename"><a href="class.domparentnode.html" class="interfacename">DOMParentNode</a></span> and
        <span class="interfacename"><a href="class.domchildnode.html" class="interfacename">DOMChildNode</a></span> now.
       </td>
      </tr>

     </tbody>
    
   </table>

  </div>


  <div class="section">
   <h2 class="title">注释</h2>
   <blockquote class="note"><p><strong class="note">注意</strong>: <p class="para">此 DOM 扩展采用 UTF-8 编码。使用 <span class="function"><a href="function.mb-convert-encoding.html" class="function">mb_convert_encoding()</a></span>、<span class="methodname"><a href="uconverter.transcode.html" class="methodname">UConverter::transcode()</a></span> 或 <span class="function"><a href="function.iconv.html" class="function">iconv()</a></span> 来处理其它编码。</p></p></blockquote>
  </div>

  



 
 </div>
 
 
































































































 
<h2>目录</h2><ul class="chunklist chunklist_reference"><li><a href="domelement.construct.html">DOMElement::__construct</a> — Creates a new DOMElement object</li><li><a href="domelement.getattribute.html">DOMElement::getAttribute</a> — Returns value of attribute</li><li><a href="domelement.getattributenode.html">DOMElement::getAttributeNode</a> — Returns attribute node</li><li><a href="domelement.getattributenodens.html">DOMElement::getAttributeNodeNS</a> — Returns attribute node</li><li><a href="domelement.getattributens.html">DOMElement::getAttributeNS</a> — Returns value of attribute</li><li><a href="domelement.getelementsbytagname.html">DOMElement::getElementsByTagName</a> — Gets elements by tagname</li><li><a href="domelement.getelementsbytagnamens.html">DOMElement::getElementsByTagNameNS</a> — Get elements by namespaceURI and localName</li><li><a href="domelement.hasattribute.html">DOMElement::hasAttribute</a> — Checks to see if attribute exists</li><li><a href="domelement.hasattributens.html">DOMElement::hasAttributeNS</a> — Checks to see if attribute exists</li><li><a href="domelement.removeattribute.html">DOMElement::removeAttribute</a> — Removes attribute</li><li><a href="domelement.removeattributenode.html">DOMElement::removeAttributeNode</a> — Removes attribute</li><li><a href="domelement.removeattributens.html">DOMElement::removeAttributeNS</a> — Removes attribute</li><li><a href="domelement.setattribute.html">DOMElement::setAttribute</a> — Adds new or modifies existing attribute</li><li><a href="domelement.setattributenode.html">DOMElement::setAttributeNode</a> — Adds new attribute node to element</li><li><a href="domelement.setattributenodens.html">DOMElement::setAttributeNodeNS</a> — Adds new attribute node to element</li><li><a href="domelement.setattributens.html">DOMElement::setAttributeNS</a> — Adds new attribute</li><li><a href="domelement.setidattribute.html">DOMElement::setIdAttribute</a> — Declares the attribute specified by name to be of type ID</li><li><a href="domelement.setidattributenode.html">DOMElement::setIdAttributeNode</a> — Declares the attribute specified by node to be of type ID</li><li><a href="domelement.setidattributens.html">DOMElement::setIdAttributeNS</a> — Declares the attribute specified by local name and namespace URI to be of type ID</li></ul>
</div>
</div></div></body></html>